package com.gientech.orderseataexercise.dao;

import com.gientech.orderseataexercise.model.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface OrderSeataDao {

    /**
     * 根据实体类插入数据
     * @param order 实体类
     */
    public Integer insertOrderInfo(@Param(value = "order") Order order);

    /**
     * 根据实体类更新数据
     * @param order 实体类
     */
    public Integer updateOrderInfo(@Param(value = "order") Order order);

    /**
     * 根据实体类获取数据
     * @param order 实体类
     * @return
     */
    public List<Order> selectOrderInfoList(@Param(value = "order") Order order);

}
